﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using WorkStation.Frameworks.Core.Extensions;

using Newtonsoft.Json;

namespace WorkStation.Frameworks.EasyBus.Repositories.ZooKeeper
{
    public static class ByteExtensions
    {
        public static T ZooNodeToObject<T>(this byte[] data) 
        {
            return JsonConvert.DeserializeObject<T>(data.ToStringByUTF8());
        }
    }
}
